
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type UserExtractRequest struct {

	WechatOrderId string `json:"wechat_order_id" form:"wechat_order_id"`

	Uid string `json:"uid" form:"uid"`

	RealName string `json:"real_name" form:"real_name"`

	ExtractType string `json:"extract_type" form:"extract_type"`

	BankCode string `json:"bank_code" form:"bank_code"`

	BankAddress string `json:"bank_address" form:"bank_address"`

	AlipayCode string `json:"alipay_code" form:"alipay_code"`

	ExtractPrice string `json:"extract_price" form:"extract_price"`

	ExtractFee string `json:"extract_fee" form:"extract_fee"`

	Mark string `json:"mark" form:"mark"`

	Balance string `json:"balance" form:"balance"`

	FailMsg string `json:"fail_msg" form:"fail_msg"`

	FailTime string `json:"fail_time" form:"fail_time"`

	AddTime string `json:"add_time" form:"add_time"`

	Status string `json:"status" form:"status"`

	Wechat string `json:"wechat" form:"wechat"`

	QrcodeUrl string `json:"qrcode_url" form:"qrcode_url"`

}

func (r *UserExtractRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *UserExtractRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"wechat_order_id": "required",

		"uid": "required",

		"real_name": "required",

		"extract_type": "required",

		"bank_code": "required",

		"bank_address": "required",

		"alipay_code": "required",

		"extract_price": "required",

		"extract_fee": "required",

		"mark": "required",

		"balance": "required",

		"fail_msg": "required",

		"fail_time": "required",

		"add_time": "required",

		"status": "required",

		"wechat": "required",

		"qrcode_url": "required",

	}
}

func (r *UserExtractRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UserExtractRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UserExtractRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
